package com.luzh.myorm.transaction;

import java.sql.Connection;
import java.sql.SQLException;

/**
 * 数据库事务
 */
public interface Transaction {

    /**
     * 获取当前事务的新连接
     * @return
     * @throws SQLException
     */
    Connection getConnection() throws SQLException;

    void commit() throws SQLException;

    void rollback() throws SQLException;

    void close() throws SQLException;

}
